﻿
Imports System.Net.Sockets
Imports osi.root.utils
Imports osi.root.connector

Partial Public Class powerpoint
    Friend Class connection
        Private ReadOnly c As TcpClient
        Private lrm As Int64

        Friend Sub New(ByVal c As TcpClient)
            assert(Not c Is Nothing)
            Me.c = c
            update_refer_ms()
        End Sub

        Public Function client() As TcpClient
            update_refer_ms()
            Return c
        End Function

        Public Function last_refer_ms() As Int64
            Return lrm
        End Function

        'return the client without update refer time, use only in internal status check
        Friend Function no_refer_client() As TcpClient
            Return c
        End Function

        Private Sub update_refer_ms()
            lrm = nowadays.milliseconds()
        End Sub
    End Class
End Class
